package chapter7.No7_2_线程组.c线程组自动归属特性;

/**
 * !
 *
 * @author liujian
 * @version 2016/12/8 0008
 */
public class Main {
    public static void main(String[] args) {
        // 线程组
        System.out.println("线程组自动归属前：" + Thread.currentThread().getThreadGroup().activeGroupCount());
        ThreadGroup aGroup = new ThreadGroup("A线程组");
        System.out.println("线程组自动归属后：" + Thread.currentThread().getThreadGroup().activeGroupCount());

        // 线程
        System.out.println("线程自动归属前：" + Thread.currentThread().getThreadGroup().activeCount());
        Thread a = new Thread();
        a.start();
        System.out.println("线程自动归属后：" + Thread.currentThread().getThreadGroup().activeCount());
    }
}
